/**
 * 随机向上滑动屏幕
 * @param {number} duration 滑动时长（毫秒）
 */
function randomSwipeUp(duration = 500) {
    let width = device.width;
    let height = device.height;

    // 设置起点坐标（横向中心 ± 偏移）
    let x1 = random(width * 0.45, width * 0.55);
    let y1 = random(height * 0.75, height * 0.85);

    // 设置终点坐标（向上滑动）
    let x2 = x1 + random(-20, 20); // 终点x可以微调
    let y2 = random(height * 0.15, height * 0.25);

    log(`滑动坐标: (${x1}, ${y1}) -> (${x2}, ${y2})`);

    swipe(x1, y1, x2, y2, random(duration-duration*0.2, duration+duration*0.2));
}
